package com.ruoyi.system.domain;

import com.mybatisflex.annotation.Column;
import com.mybatisflex.annotation.Id;
import com.mybatisflex.annotation.KeyType;
import com.mybatisflex.annotation.Table;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.util.List;

/**
 * 分类
 *
 * @author zhangqingshan
 * @date 2025-08-29
 */
@Table("hsz_clazz")
@Data
public class HszClazz {
    /**
     * clazz_id
     */
    @Id(keyType = KeyType.Auto)
    private Long clazzId;

    /**
     * name
     */
    @NotBlank(message = "名称不能为空")
    @Length(max = 20, message = "名称长度不能超过20个字符")
    private String name;

    /**
     * sort
     */
    private Integer sort = 1;

    /**
     * pid
     */
    private Long pid;

    @Column(ignore = true)
    private List<HszClazz> childClazz;
}
